package com.easycarebn.request.data;

import java.io.Serializable;
import java.util.ArrayList;

import com.easycarebn.request.data.AppointmentItem.Doctor;
import com.easycarebn.request.data.DoctorInfo.Booking;

public class DoctorDetail implements Serializable {
	private int doctor_id;
	private String avatar;
	private String name;
	private String clinicname_default;
	private ArrayList<String> speciality;
	private ArrayList<String> clinictype;

	private String position;
	private float rating;
	private Booking booking;
	private ArrayList<Address> list_address;
	private ArrayList<Address> address;
	private ArrayList<Doctor> listdoctor;

	private String profile;
	private String short_content;
	private ArrayList<String> placeofwork;
	private ArrayList<String> associations;
	private ArrayList<Item> degree;
	private ArrayList<Item> language;
	private int favorite;

	public static class Address implements Serializable {
		private int is_default;
		private String address;

		public int getIs_default() {
			return is_default;
		}

		private String map_position;

		public String getAddress() {
			return address;
		}

		public String getMap_position() {
			return map_position;
		}

	}

	public static class Doctor {
		private String doctor_id;
		private String avatar;
		private String name;
		private ArrayList<String> speciality;
		private ArrayList<String> placeofwork;

		public String getName() {
			return name;
		}

		public String getDoctor_id() {
			return doctor_id;
		}

		public String getAvatar() {
			return avatar;
		}

		public ArrayList<String> getSpeciality() {
			return speciality;
		}

		public ArrayList<String> getPlaceofwork() {
			return placeofwork;
		}

	}

	public ArrayList<Doctor> getListdoctor() {
		return listdoctor;
	}

	public ArrayList<String> getClinictype() {
		return clinictype;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setDoctor_id(int doctor_id) {
		this.doctor_id = doctor_id;
	}

	public static class Rating implements Serializable {
		private String count_rating;
		private String sum_rating;
	}

	public static class Item implements Serializable {
		private String name;

		public String getName() {
			return name;
		}
	}

	public String getClinicname_default() {
		return clinicname_default;
	}

	public int getDoctorId() {
		return doctor_id;
	}

	public String getAvatar() {
		return avatar;
	}

	public String getName() {
		return name;
	}

	public ArrayList<String> getSpeciality() {
		return speciality;
	}

	public String getSpecialities() {
		if (speciality == null || speciality.isEmpty()) {
			return "";
		}
		StringBuilder builder = new StringBuilder();
		if (speciality.size() > 1) {
			builder.append(speciality.get(0));
			for (int i = 1; i < speciality.size(); i++) {
				builder.append("\n").append(speciality.get(i));
			}
		} else {
			builder.append(speciality.get(0));
		}
		return builder.toString();
	}

	public String getPosition() {
		return position;
	}

	public Booking getBooking() {
		return booking;
	}

	public String getProfile() {
		return profile;
	}
	
	public String getShort_content() {
		return short_content;
	}

	public ArrayList<String> getPlaceofwork() {
		return placeofwork;
	}

	public String getPlaceofworks() {
		if (placeofwork == null || placeofwork.isEmpty()) {
			return "";
		}
		StringBuilder builder = new StringBuilder();
		if (placeofwork.size() > 1) {
			builder.append(placeofwork.get(0));
			for (int i = 1; i < placeofwork.size(); i++) {
				builder.append("\n").append(placeofwork.get(i));
			}
		} else {
			builder.append(placeofwork.get(0));
		}
		return builder.toString();
	}

	public ArrayList<String> getAssociation() {
		return associations;
	}

	public String getAssociations() {
		if (associations == null || associations.isEmpty()) {
			return "";
		}
		StringBuilder builder = new StringBuilder();
		if (associations.size() > 1) {
			builder.append(associations.get(0));
			for (int i = 1; i < associations.size(); i++) {
				builder.append("\n").append(associations.get(i));
			}
		} else {
			builder.append(associations.get(0));
		}
		return builder.toString();
	}

	public ArrayList<Item> getDegree() {
		return degree;
	}

	public String getDegrees() {
		if (degree == null || degree.isEmpty()) {
			return "";
		}
		StringBuilder builder = new StringBuilder();
		if (degree.size() > 1) {
			builder.append(degree.get(0).getName());
			for (int i = 1; i < degree.size(); i++) {
				builder.append(", ").append(degree.get(i).getName());
			}
		} else {
			builder.append(degree.get(0).getName());
		}
		return builder.toString();
	}

	public ArrayList<Item> getLanguage() {
		return language;
	}

	public String getAddress() {
		if (list_address == null || list_address.isEmpty()) {
			return "";
		}
		return list_address.get(0).address;
	}

	public String getAddress2() {
		if (address == null || address.isEmpty()) {
			return "";
		}
		return address.get(0).address;
	}

	public float getRating() {
		return rating;
	}

	public ArrayList<Address> getList_address() {
		return list_address;
	}

	public String getMapPosition() {
		if (list_address == null || list_address.isEmpty()) {
			return "";
		}
		return list_address.get(0).map_position;
	}

	public int getFavorite() {
		return favorite;
	}
}
